fix(vertexai): preserve GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY in state if explicitly configured for ReasoningEngine#18356
Conversation
… state if explicitly configured for ReasoningEngine
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @melinath, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 4065b1e: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode 🟢 All tests passed in Replaying mode! No Recording was needed. View the replaying VCR build log |
melinath
left a comment
There was a problem hiding this comment.
Please do a local review with a Google engineer from the service team as described at go/terraform-service-review. Let me know when that's finished and I'll follow up with final review & merge.
(Please also add some details to the initial comment about why this change is being made in this way - the original behavior of the resource is unusual and this change makes it even more unusual.)
| var envList []interface{} | ||
| if set, ok := envRaw.(*schema.Set); ok { | ||
| envList = set.List() | ||
| } else if list, ok := envRaw.([]interface{}); ok { |
There was a problem hiding this comment.
do we use some old go version that doesn't have any keyword ?
| } else if list, ok := envRaw.([]interface{}); ok { | |
| } else if list, ok := envRaw.([]any); ok { |
fix(vertexai): preserve GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY in state if explicitly configured for ReasoningEngine
Update custom flattener for vertex_ai_reasoning_engine spec.deployment_spec.env to only filter out GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY if it was not explicitly defined in the Terraform configuration.
When configured in HCL, the environment variable is now correctly preserved in state, allowing telemetry settings to be managed via Terraform. Added unit test covering both scenarios.
Fixes hashicorp/terraform-provider-google#28409
b/537345781